import { axios } from '@/utils/request'

const api = {
  config: '/alipay-config/index',
  article: '/saas/alliance-article',
}

export default api

export function getAlipayConfig(parameter) {
  return axios({
    url: api.config,
    method: 'get',
    params: parameter,
  })
}

export function setAlipayConfig(parameter) {
  return axios({
    url: api.config,
    method: 'post',
    data: parameter,
  })
}

export function getAllianceArticle(params) {
  return axios({
    url: api.article,
    method: 'get',
    params,
  })
}

export function setAllianceArticle(data) {
  return axios({
    url: api.article,
    method: 'post',
    data,
  })
}


export function getCrtIndex(params) {
  return axios({
    url: '/alipay-config/crt-index',
    method: 'get',
    params,
  })
}

export function setCrtIndex(data) {
  return axios({
    url: '/alipay-config/crt-index',
    method: 'post',
    data,
  })
}
